

<div class="layui-form" lay-filter="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
	<!-- display = none -->
	<div class="layui-form-item" style="display: none;">
	  <label class="layui-form-label">ID</label>
	  <div class="layui-input-inline">
	    <script type="text/html" template>
	      <input type="text" name="id" value="{{ d.params.id || '' }}" lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
	    </script>
	  </div>
	</div>
  <div class="layui-form-item">
    <label class="layui-form-label">昵称</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="name" value="{{ d.params.name || '' }}" lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">账号</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="account" value="{{ d.params.username || '' }}" lay-verify="required" placeholder="请输入号码" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="text" name="password" value="{{ d.params.password || '' }}" lay-verify="password" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
		  {{#console.log(d)}}
		  {{#  layui.each(d.params.roleList, function(index, item){ }}
		    <input type="checkbox" name="roleIdList" value={{item.id}} title={{item.name}} lay-skin="primary" {{ d.params.roleIdList.indexOf(item.id) != -1 ? 'checked' : '' }}><br>
		  {{#  }); }}
      </script>
	  <div id="rolesView">
	  		  
	  </div>
	  
	  
	  
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-inline">
      <script type="text/html" template>
        <input type="checkbox" lay-filter="switch" value="0" name="status" {{ d.params.status==0 ? 'checked' : '' }} lay-skin="switch" lay-text="正常|封禁">
      </script>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-inline">
      <input type="button" lay-submit lay-filter="LAY-user-back-submit" value="确认" class="layui-btn">
    </div>
  </div>
</div>

<script>
layui.use(['admin', 'form'], function(){
  var $ = layui.$
  ,form = layui.form;
  
});
</script>